package com.sunyard.manage.service;

import com.sunyard.dal.bo.device.key.KeyAddBO;
import com.sunyard.dal.bo.device.key.KeyCheckBO;
import com.sunyard.dal.bo.device.key.KeyCheckDetailBO;
import com.sunyard.dal.bo.device.key.KeyCopyQueryBO;
import com.sunyard.dal.bo.device.key.KeyDeleteBO;
import com.sunyard.dal.bo.device.key.KeyQueryBO;
import com.sunyard.dal.bo.device.key.KeyUpdateBO;
import com.sunyard.dal.bo.device.key.KeyUpdateStateBO;
import com.sunyard.dal.bo.device.key.KeyUploadLogBO;
import com.sunyard.dal.bo.PaginationBO;
import com.sunyard.dal.dto.KeyCheckDetailResDTO;
import com.sunyard.dal.dto.KeyCopyQueryResDTO;
import com.sunyard.dal.dto.KeyQueryResDTO;
import com.sunyard.utils.Response.BaseResult;
import com.sunyard.utils.manage.DataGrid;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public interface KeyService {
    /**
     * 分页查询终端信息
     *
     * @param queryBO [queryBO]
     * @return BaseResult<DataGrid < KeyQueryResDTO>>
     **/
    BaseResult<DataGrid<KeyQueryResDTO>> getKeyByPage(PaginationBO<KeyQueryBO> queryBO, HttpServletRequest request);

    /**
     * 添加终端
     *
     * @param addBO [addBO]
     * @return BaseResult
     **/
    BaseResult addKey(KeyAddBO addBO, HttpServletRequest request);

    /**
     * 删除终端信息
     *
     * @param deleteBO [deleteBO]
     * @return BaseResult
     **/
    BaseResult deleteKey(KeyDeleteBO deleteBO);

    /**
     * 修改终端信息
     *
     * @param updateBO [updateBO]
     * @return BaseResult
     **/
    BaseResult updateKey(KeyUpdateBO updateBO);

    /**
     * 终端启用停用
     *
     * @param updateStateBO [updateStateBO]
     * @return BaseResult
     **/
    BaseResult updateState(KeyUpdateStateBO updateStateBO);

    /**
     * 导出终端信息
     *
     * @return BaseResult
     **/
    BaseResult exportKey(HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 上传操作日志
     *
     * @param uploadLogBO uploadLogBO
     * @param request     request
     * @return BaseResult
     **/
    BaseResult uploadLog(KeyUploadLogBO uploadLogBO, HttpServletRequest request);

    /**
     * 终端信息审核
     *
     * @param checkBO
     * @param request [checkBO, request]
     * @return BaseResult
     * @author: guangw.dang
     * @Date: 2022/7/7 11:06
     **/
    BaseResult checkKey(KeyCheckBO checkBO, HttpServletRequest request);

    /**
     * 分页查询终端审核信息
     *
     * @param queryBO
     * @param request [queryBO, request]
     * @return BaseResult<DataGrid < KeyCopyQueryResDTO>>
     **/
    BaseResult<DataGrid<KeyCopyQueryResDTO>> getKeyCopyByPage(PaginationBO<KeyCopyQueryBO> queryBO, HttpServletRequest request);

    /**
     * 查询审核详情
     *
     * @param checkBO
     * @param request [checkBO, request]
     * @return BaseResult<KeyCheckDetailResDTO>
     **/
    BaseResult<KeyCheckDetailResDTO> checkDetail(KeyCheckDetailBO checkBO, HttpServletRequest request);
}
